1. Technical Field
The present disclosure relates to a filtering device and an environment recognition system which determines, when calculating a difference value (parallax) of an object among multiple comparison targets, whether the difference value is valid.
2. Related Art
There are conventionally known a technique, such as collision avoidance control, which detects specific objects including another vehicle located ahead of a vehicle, and avoids a collision with a leading vehicle, and a technique, such as a cruise control, which controls so as to maintain an inter-vehicle distance with a leading vehicle at a safe distance (for instance, see Japanese Patent (JP-B) No. 3,349,060).
Such a collision-avoidance control and cruise control derive a parallax by using so-called pattern matching, in order to acquire a relative distance from the vehicle, of an object located ahead the vehicle. The pattern matching acquires image data from, for example, each of two imaging devices of which viewpoints differ from each other. The pattern matching then extracts any one of blocks from an image (hereinafter, referred to as “the reference image”) based on the image data generated by one of the imaging devices, and then searches a highly-correlated block from an image (hereinafter, referred to as “the comparison image”) based on the image data generated by the other imaging device. Then, the pattern matching refers to imaging parameters, such as installed positions and focal lengths of the imaging devices, uses so-called a stereo method or a triangulation method to calculate relative distances of the object with respect to the imaging devices based on the derived parallax, and converts the calculated relative distances into three-dimensional (3D) positional information which contains a horizontal distance and a height of the object in addition to the calculated relative distances. Further, various recognition processing are performed using the 3D positional information. Note that the term “horizontal” as used herein refers to screen horizontal or lateral directions, and the term “vertical (described later)” as used herein refers to screen vertical directions.
The above-described pattern matching calculates the correlation of the block in the comparison image with the block in the reference image while horizontally shifting the target block of the comparison image, and then calculates differences (difference values) between coordinates of the block in the comparison image of which the correlation is highest and coordinates of the block in the reference image, as the parallax. However, in a case where similar patterns continue horizontally, the correlations hardly indicate differences between blocks even if the target block in the comparison image is changed or shifted, resulting in erroneous derivations of the parallaxes.
Therefore, for example, JP-B No. 3,348,939 discloses a technique that uses an evaluation function in the pattern matching, such as sum of absolute difference (SAD) which is obtained by integrating the differences in luminance between each pixel within one block in the comparison image and a corresponding pixel, located at the same position as the first pixel, within another block in the reference image. This technique determines whether the minimum value of the evaluation values (where the correlation becomes the highest value) satisfies a predetermined condition, for example, whether the minimum value is less than a predetermined fixed value. If the minimum value is less than the predetermined fixed value, the parallax of the target block is determined to be valid. Further, for example, JP-B No. 3,917,285 discloses a technique that calculates average values in luminance of pixels around respective blocks in the reference image and the comparison image, subtracts each average value from the luminance within the corresponding block to derive an evaluation value (i.e., average value difference matching). By using such evaluation functions, variations in the images between the reference image and the comparison image, as well as effects due to low-frequency noise can be reduced.
However, the technique disclosed in JP-B No. 3,348,939 which compares the minimum value of the evaluation values with the fixed value has a difficulty to determine a unified or common fixed value which can be used for the evaluation of the existence of the correlation under various environments. Moreover, in the technique disclosed in JP-B No. 3,917,285 using the average value difference matching, the evaluation value greatly varies depending on imaging conditions of the imaging devices, for example, a fogging state of a windshield in front of the imaging devices and/or brightness of the circumference environment, even if the comparing images are obtained under similar environments. Therefore, the parallax (difference value) to be invalidated has not been effectively excluded.